<template>
  <el-dialog :visible.sync="isShowDialog"
             width="1000px"
             @close="close()"
             center>
    <div class="card-border">
      <el-tabs tab-position="top">
        <el-tab-pane label="规划信息">
          <achievement-detail :id="achievementId"></achievement-detail>
        </el-tab-pane>
        <el-tab-pane label="立项信息">
          <registerinfo-detail :id="achievementId"></registerinfo-detail>
        </el-tab-pane>
        <el-tab-pane label="前期研究">
          <subject-list :id="achievementId"></subject-list>
        </el-tab-pane>
        <el-tab-pane label="编制信息">
          <make-detail :id="achievementId"></make-detail>
        </el-tab-pane>
        <el-tab-pane label="审批信息">
          <review-detail :id="achievementId"></review-detail>
        </el-tab-pane>
        <el-tab-pane label="监测评估">
          <planning-detail :id="pmuc"></planning-detail>
        </el-tab-pane>
        <el-tab-pane label="修订信息">
          <revise-detail :id="achievementId"></revise-detail>
        </el-tab-pane>
      </el-tabs>
    </div>
    <div slot="footer"
         class="dialog-footer">
      <el-button @click="close()">关 闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
import achievementDetail from "@/components/achievement/detail"
import registerinfoDetail from "@/components/registerinfo/detail"
import subjectList from "@/components/subject/list"
import makeDetail from "@/components/make/detail"
import reviewDetail from "@/components/review/detail"
import reviseDetail from "@/components/revise/detail"
import planningDetail from "@/components/planning/planningDetail"

export default {
  name: "detailDialog",
  components: {
    achievementDetail,
    registerinfoDetail,
    subjectList,
    makeDetail,
    reviewDetail,
    reviseDetail,
    planningDetail
  },
  props: {
    achievementId: {
      type: Number,
      default: 0
    },
    pmuc: {
      type: String,
      default: ''
    },
    showDetailDialog: {
      type: Boolean,
      default: false
    },
  },
  watch: {
    showDetailDialog: {
      immediate: true,
      handler (val) {
        this.isShowDialog = val
      }
    }
  },
  data () {
    return {
      isShowDialog: false,
    }
  },
  methods: {
    close () {
      this.$emit('update:showDetailDialog', false)
    }
  },

}
</script>

<style scoped>
</style>
